<?php

namespace App\Http\Requests\Api;

class EventRecordRequest extends FormRequest
{
    public function rules()
    {
        switch ($this->method()) {
            case 'POST':
                $arr = [
                    'event' => 'required|string|max:50',
                    'model_id' => 'required|integer',
                ];
                return $arr;
                break;
        }
    }

    public function attributes()
    {
        return [
            'event' => '事件',
            'model_id' => '模型ID',
        ];
    }

}
